﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace InkjetControl.model
{
    public class StatusModel : ViewModelBase
    {


        private int _phaseValue;
        private int _phaseAngle;
        private int _viscosity;
        private int _highVoltage;
        private int _pressure;

        private int _inkCylinder;
        private int _viscosityCylinder;
        private int _solventCylinder;
        private int _mixCylinder;

        private long _flightTime;

        private float _mixTemplature;
        private float _nozzleTemplature;
        private float _chassisTemplature;

        private int _supplyInkState;

        private bool _isNozzleCoverFailure;
        private bool _isHighVoltageFailure;
        private bool _isPhaseChargingFailure;
        private bool _isPhaseFailure;
        private bool _isRecycleFailure;

        private EquipmentState _equipmentState;

        private bool _printDone;

        private int _printCount;

        public EquipmentState EquipmentState
        {
            get => _equipmentState;
            set => SetProperty(ref _equipmentState, value);
        }

        public bool PrintDone
        {
            get => _printDone;
            set => SetProperty(ref _printDone, value);
        }

        public int PrintCount
        {
            get => _printCount;
            set => SetProperty(ref _printCount, value);
        }

        public bool IsRecycleFailure
        {
            get => _isRecycleFailure;
            set => SetProperty(ref _isRecycleFailure, value);
        }

        public int PhaseValue
        {
            get => _phaseValue;
            set => SetProperty(ref _phaseValue, value);
        }

        public int PhaseAngle
        {
            get => _phaseAngle;
            set => SetProperty(ref _phaseAngle, value);
        }
        public int Viscosity
        {
            get => _viscosity;
            set => SetProperty(ref _viscosity, value);
        }
        public int HighVoltage
        {
            get => _highVoltage;
            set => SetProperty(ref _highVoltage, value);
        }
        public int Pressure
        {
            get => _pressure;
            set => SetProperty(ref _pressure, value);
        }
        public int InkCylinder
        {
            get => _inkCylinder;
            set => SetProperty(ref _inkCylinder, value);
        }
        public int ViscosityCylinder
        {
            get => _viscosityCylinder;
            set => SetProperty(ref _viscosityCylinder, value);
        }
        public int SolventCylinder
        {
            get => _solventCylinder;
            set => SetProperty(ref _solventCylinder, value);
        }
        public int MixCylinder
        {
            get => _mixCylinder;
            set => SetProperty(ref _mixCylinder, value);
        }
        public long FlightTime
        {
            get => _flightTime;
            set => SetProperty(ref _flightTime, value);
        }
        public float MixTemplature
        {
            get => _mixTemplature;
            set => SetProperty(ref _mixTemplature, value);
        }
        public float NozzleTemplature
        {
            get => _nozzleTemplature;
            set => SetProperty(ref _nozzleTemplature, value);
        }
        public float ChassisTemplature
        {
            get => _chassisTemplature;
            set => SetProperty(ref _chassisTemplature, value);
        }
        public int SupplyInkState
        {
            get => _supplyInkState;
            set => SetProperty(ref _supplyInkState, value);
        }
        public bool IsNozzleCoverFailure
        {
            get => _isNozzleCoverFailure;
            set => SetProperty(ref _isNozzleCoverFailure, value);
        }
        public bool IsHighVoltageFailure
        {
            get => _isHighVoltageFailure;
            set => SetProperty(ref _isHighVoltageFailure, value);
        }
        public bool IsPhaseChargingFailure
        {
            get => _isPhaseChargingFailure;
            set => SetProperty(ref _isPhaseChargingFailure, value);
        }
        public bool IsPhaseFailure
        {
            get => _isPhaseFailure;
            set => SetProperty(ref _isPhaseFailure, value);
        }

    }


    /**
     * 喷码机已停止
     * 正在供墨中
     * 供墨完成
     * 开始打印
     * 停止打印
     * 停止供墨中
     */
    public enum EquipmentState
    {
        /**
         * 喷码机已停止
         */
        STOPPED,
        /**
         * 停止供墨中
         */
        STOPPING_INK_SUPPLY,
        /**
         * 正在供墨中
         */
        SUPPLYING_INK,
        /**
         * 检测中
         */
        CHECKING,
        /**
         * 供墨完成
         */
        DONE_INK,
        /**
         * 停止打印
         */
        STOP_PRINT,
        /**
         * 喷印中
         */
        PRINTING
    }

}
